/**
 * BCBubbleNode
 * 节点气泡动画组件，挂在节点上使节点像气泡呼吸那样
 */

import { _decorator, Component, Node, tween, v3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('BCBubbleNode')
export class BCBubbleNode extends Component {
    start(){
		const scale = this.node.scale.x;
		tween(this.node).repeatForever(
			tween().to(0.2, { scale: v3(scale + 0.1, scale + 0.1, 1) }).to(0.2, { scale: v3(scale - 0.1, scale - 0.1, 1) }).to(0.1, { scale: v3(scale, scale, 1) }).delay(1)
		).start();
	}
}

